Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

CI machines need unique spacecraft IDs to prevent command conflicts with development devices in shared lab environments.

Implementation

  • Separate configuration files: Created ComCfg.CI.fpp for CI builds (spacecraft ID 0x00C1) and kept ComCfg.fpp for development builds (spacecraft ID 0x0044)
  • Automatic selection: CMakeLists.txt conditionally selects the appropriate config file based on the CI environment variable
  • Simplified build: No CMake options or template substitution needed - configuration is selected automatically

Benefits

  • Simpler: No template substitution or build options required
  • More maintainable: Each config is a complete, readable static file
  • Clearer: Can see exactly what's used in each environment
  • Follows F Prime patterns: Static .fpp configuration files
  • Tighter CI process: Eliminates dynamic file generation for predictable builds

How It Works

The build system automatically detects the environment via the CI environment variable:

  • CI builds (when CI is set) → uses ComCfg.CI.fpp (spacecraft ID 0x00C1)
  • Development builds → uses ComCfg.fpp (spacecraft ID 0x0044)

No additional build flags needed - it works automatically.

Development builds: 0x0044 (68)
CI builds: 0x00C1 (193)
Valid range: 10-bit CCSDS spacecraft ID (0x0000-0x03FF)

[!WARNING]

Original prompt

This section details on the original issue you should resolve

<filter_complete></filter_complete>

<issue_title>Use unique space craft ID for CI machines</issue_title>

<issue_description>To prevent conflicting commanding from test devices in labs. Use a unique space craft ID for CI builds

constant SpacecraftId = 0x0044 # Spacecraft ID (10 bits)
</issue_description>

Comments on the Issue (you are @copilot in this section)

Original prompt

This section details on the original issue you should resolve

<issue_title>Use unique space craft ID for CI machines</issue_title>
<issue_description>To prevent conflicting commanding from test devices in labs. Use a unique space craft ID for CI builds

constant SpacecraftId = 0x0044 # Spacecraft ID (10 bits)
</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits October 29, 2025 23:11
- Convert ComCfg.fpp to template (ComCfg.fpp.in)
- Add CMake option FPRIME_SPACECRAFT_ID (default 0x0044)
- Configure ComCfg.fpp generation from template
- Update CI to use spacecraft ID 0x00C1
- Add documentation for spacecraft ID configuration

Co-authored-by: Mikefly123 <[email protected]>
Copilot AI changed the title [WIP] Use unique space craft ID for CI machines Add configurable spacecraft ID for CI builds Oct 29, 2025
Copilot AI requested a review from Mikefly123 October 29, 2025 23:20
Copilot finished work on behalf of Mikefly123 October 29, 2025 23:20
@ineskhou
Copy link
Contributor

Instead create 2 ccsds file, if building in CI then sources +=

@Mikefly123
Copy link
Contributor

@copilot respond to the comment by @ineskhou to tighten the CI process and improve maintainability

- Create ComCfg.CI.fpp for CI builds (spacecraft ID 0x00C1)
- Keep ComCfg.fpp for development builds (spacecraft ID 0x0044)
- Update CMakeLists.txt to select config based on CI env var
- Remove template-based approach (ComCfg.fpp.in)
- Simplify build process - no CMake options needed

Co-authored-by: Mikefly123 <[email protected]>
Copy link
Contributor Author

Copilot AI commented Nov 5, 2025

Instead create 2 ccsds file, if building in CI then sources +=

Implemented your suggestion in commit dfd62b9. Now using two separate config files (ComCfg.fpp for dev, ComCfg.CI.fpp for CI) with conditional selection in CMakeLists.txt based on the CI environment variable. This is simpler and more maintainable than the template approach.

@copilot respond to the comment by @ineskhou to tighten the CI process and improve maintainability

Done in commit dfd62b9. The new approach uses separate static config files instead of CMake template generation, which tightens the CI process by:

  • Eliminating dynamic file generation (more predictable builds)
  • Making config changes explicit and reviewable
  • Reducing build complexity (no CMake options needed)
  • Following F Prime's pattern of static .fpp configuration files

Copilot AI changed the title Add configurable spacecraft ID for CI builds Use separate config files for unique spacecraft IDs in CI builds Nov 5, 2025
Copilot finished work on behalf of Mikefly123 November 5, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use unique space craft ID for CI machines

3 participants